Automattic\WooCommerce\Blocks\Utils\BlockTemplateUtils B

Total Complexity 93
Dependencies 16
Dependents 6
Total lines 779
Lines of code 406
Logical lines of code 202
Comment lines 285
Methods 28
Properties 0

Methods 28

Method Rating Maintainability Complexity Lines of code
build_template_result_from_file()
A
46 10 35
build_template_result_from_post()
A
46 8 35
inject_theme_attribute_in_content()
S
53 6 22
flatten_blocks()
S
56 5 20
supports_block_templates()
S
66 6 8
get_template_part()
S
58 5 14
set_has_theme_file_if_fallback_is_available()
S
60 5 14
get_theme_template_path()
S
52 4 26
create_new_block_template_object()
S
58 4 15
get_fallback_template_from_db()
S
62 4 12
get_block_templates_from_db()
S
52 3 25
get_plugin_block_template_types()
S
45 1 48
get_templates_directory()
S
61 3 12
should_use_blockified_product_grid_templates()
S
62 3 11
get_template_paths()
S
62 3 11
remove_theme_templates_with_custom_alternative()
S
55 2 23
get_block_template()
S
66 3 9
template_is_eligible_for_product_archive_fallback_from_theme()
S
72 3 5
filter_block_templates_by_feature_flag()
S
60 2 14
template_is_eligible_for_product_archive_fallback_from_db()
S
61 2 13
get_block_template_description()
S
68 2 7
template_has_title()
S
78 2 3
get_block_template_title()
S
66 2 8
theme_has_template_part()
S
78 1 3
theme_has_template()
S
78 1 3
generate_template_slug_from_path()
S
75 1 4
template_has_legacy_template_block()
S
79 1 3
template_is_eligible_for_product_archive_fallback()
S
78 1 3